from rest_framework import serializers
from home.models import NavModel, BannerModel


# 导航序列化器
class NavSerializer(serializers.ModelSerializer):
    class Meta:
        model = NavModel
        fields = ['name', 'link', 'is_http']


# 轮播图序列化器
class BannerSerializer(serializers.ModelSerializer):
    class Meta:
        model = BannerModel
        fields = ['image', 'link', 'is_http']
